home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TempFocus.h
-
- Contains: Stack-based utility classes for requesting and releasing foci.
-
- Written by: Troy Gaul
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
-
- #ifndef _TEMPFOCUS_
- #define _TEMPFOCUS_
-
- //------------------------------------------------------------------------------
- // Forward declarations
- //------------------------------------------------------------------------------
-
- struct Environment;
- class ODFrame;
-
- //------------------------------------------------------------------------------
- // TempFocus
- //------------------------------------------------------------------------------
-
- class TempFocus : Destructo {
-
- public:
- TempFocus(Environment*, ODTypeToken focusType, ODFrame*);
- ~TempFocus();
-
- ODBoolean Request();
-
- protected:
- TempFocus(Environment*, ODFrame*);
- // Can be used by subclasses to defer setting the type of
- // the focus until inside its constructor.
-
- private: // disallow these:
- TempFocus(const TempFocus&);
- void operator=(const TempFocus&);
-
- protected:
- ODTypeToken fFocusType;
-
- private:
- Environment* fEv;
- ODFrame* fFrameToFocus;
- ODBoolean fAcquired;
- };
-
- //------------------------------------------------------------------------------
- // TempClipboardFocus
- //------------------------------------------------------------------------------
-
- class TempClipboardFocus : public TempFocus {
-
- public:
- TempClipboardFocus(Environment*, ODFrame*);
- };
-
- #endif
-
-
-